package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallCustomerTaobao;
import com.appkubes.mall.core.po.MallCustomerTaobaoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallCustomerTaobaoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomerTaobaoSqlProvider.class, method="countByExample")
    long countByExample(MallCustomerTaobaoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallCustomerTaobaoSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallCustomerTaobaoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_customer_taobao",
        "where customer_key = #{customerKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String customerKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_customer_taobao (customer_key, app_key, ",
        "pid, alipay, alipay_name, ",
        "update_time, create_time, ",
        "version)",
        "values (#{customerKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{pid,jdbcType=VARCHAR}, #{alipay,jdbcType=VARCHAR}, #{alipayName,jdbcType=VARCHAR}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallCustomerTaobao record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallCustomerTaobaoSqlProvider.class, method="insertSelective")
    int insertSelective(MallCustomerTaobao record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomerTaobaoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="pid", property="pid", jdbcType=JdbcType.VARCHAR),
        @Result(column="alipay", property="alipay", jdbcType=JdbcType.VARCHAR),
        @Result(column="alipay_name", property="alipayName", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallCustomerTaobao> selectByExampleWithRowbounds(MallCustomerTaobaoExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomerTaobaoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="pid", property="pid", jdbcType=JdbcType.VARCHAR),
        @Result(column="alipay", property="alipay", jdbcType=JdbcType.VARCHAR),
        @Result(column="alipay_name", property="alipayName", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallCustomerTaobao> selectByExample(MallCustomerTaobaoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "customer_key, app_key, pid, alipay, alipay_name, update_time, create_time, version",
        "from mall_customer_taobao",
        "where customer_key = #{customerKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="pid", property="pid", jdbcType=JdbcType.VARCHAR),
        @Result(column="alipay", property="alipay", jdbcType=JdbcType.VARCHAR),
        @Result(column="alipay_name", property="alipayName", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallCustomerTaobao selectByPrimaryKey(String customerKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomerTaobaoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallCustomerTaobao record, @Param("example") MallCustomerTaobaoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomerTaobaoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallCustomerTaobao record, @Param("example") MallCustomerTaobaoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomerTaobaoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallCustomerTaobao record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_taobao
     *
     * @mbg.generated
     */
    @Update({
        "update mall_customer_taobao",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "pid = #{pid,jdbcType=VARCHAR},",
          "alipay = #{alipay,jdbcType=VARCHAR},",
          "alipay_name = #{alipayName,jdbcType=VARCHAR},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "version = #{version,jdbcType=INTEGER}",
        "where customer_key = #{customerKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallCustomerTaobao record);
}